﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using ChinaUnicom.ViewModels;
using Avatar.Log;

namespace ChinaUnicom.Views
{
    public partial class SigningPage : PhoneApplicationPage
    {
        public SigningPage()
        {
            InitializeComponent();

            Loaded += OnPageLoaded;
        }

        void OnPageLoaded(object sender, RoutedEventArgs e)
        {
            string mibile = NavigationContext.QueryString["mobile"];
            string password = NavigationContext.QueryString["password"];
            string imgCode = NavigationContext.QueryString["imgCode"];

            SigningContext context = new SigningContext(mibile, password, imgCode);
            DataContext = context;
        }

        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = true;
            base.OnBackKeyPress(e);
        }
    }
}